//
// Created by 86156 on 25-7-8.
//

#ifndef GYRO_DRIVER_H
#define GYRO_DRIVER_H

#define Gyro_BufferSize 200
#define constant_g 9.80665
#include <stdint.h>

typedef struct{
    float Ax;
    float Ay;
    float Az;

    float Wx;
    float Wy;
    float Wz;

    float Pitch;
    float Yaw;
    float Roll;
    float Tem;

    int8_t CC_ROL;
    int8_t CC_YAW;

    float Roll_Init;
    float Yaw_Init;
    float Yaw_Diff;
    float Rol_Diff;
    float Yaw_Total;
    float Rol_Total;

}JY60_t;

extern uint8_t JY60_InitFlag;
extern uint8_t Gyro_Buffer[Gyro_BufferSize];
extern JY60_t JY60,JY60_Last;
extern uint16_t flag2;

extern uint16_t Depth;
extern float Depth_Measure ;
extern uint16_t Coordinate_X ;
extern uint16_t Coordinate_Y ;
extern int16_t X_Measure;
extern int16_t Y_Measure;

void JY60_Init();
void JY60_Decode();


#endif //GYRO_DRIVER_H
